﻿using UnityEngine;
using System.Collections;

public class Atirador : MonoBehaviour {

	public GameObject shoot;
	public int cont = 8;
	// Use this for initialization
	void Start () {

	
	}
	
	// Update is called once per frame
	void Update () {
		cont--;
		//Debug.Log(cont);
		if(Input.GetKey(KeyCode.Space)&& cont <= 0)
	  {
			Instantiate(shoot, transform.position, transform.rotation);
			cont = 8;
		}


	}
}
